/**
 * 
 */
package cn.netjava.softkid.chapter14;

import java.sql.*;

public class Connector 
{
	private static Connection con;
	
	static 
	{
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://localhost:3306/dip";
			con = DriverManager.getConnection(url, "root","123456");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	public static Connection getConnection()
	{
		return con;
	}
}
